function [out] = reserve_z_fun(c_val,beta_val,sigma_z,input_list,output_list)
% computes the reservation value (in units of z)

output_val = c_val/(beta_val*sigma_z);

[~,temp] = min(abs(output_list-output_val));

out = input_list(temp)*sigma_z;       % r in units of z
                                      % multiply by sigma_z to go back to
                                      % the right scale

end